package com.ruoyi.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.ShoppingPurchaseMapper;
import com.ruoyi.order.domain.ShoppingPurchase;
import com.ruoyi.order.service.IShoppingPurchaseService;

/**
 * 购买详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-09
 */
@Service
public class ShoppingPurchaseServiceImpl implements IShoppingPurchaseService 
{
    @Autowired
    private ShoppingPurchaseMapper shoppingPurchaseMapper;

    /**
     * 查询购买详情
     * 
     * @param merchantOrderNumber 购买详情主键
     * @return 购买详情
     */
    @Override
    public ShoppingPurchase selectShoppingPurchaseByMerchantOrderNumber(String merchantOrderNumber)
    {
        return shoppingPurchaseMapper.selectShoppingPurchaseByMerchantOrderNumber(merchantOrderNumber);
    }

    /**
     * 查询购买详情列表
     * 
     * @param shoppingPurchase 购买详情
     * @return 购买详情
     */
    @Override
    public List<ShoppingPurchase> selectShoppingPurchaseList(ShoppingPurchase shoppingPurchase)
    {
        return shoppingPurchaseMapper.selectShoppingPurchaseList(shoppingPurchase);
    }

    /**
     * 新增购买详情
     * 
     * @param shoppingPurchase 购买详情
     * @return 结果
     */
    @Override
    public int insertShoppingPurchase(ShoppingPurchase shoppingPurchase)
    {
        return shoppingPurchaseMapper.insertShoppingPurchase(shoppingPurchase);
    }

    /**
     * 修改购买详情
     * 
     * @param shoppingPurchase 购买详情
     * @return 结果
     */
    @Override
    public int updateShoppingPurchase(ShoppingPurchase shoppingPurchase)
    {
        return shoppingPurchaseMapper.updateShoppingPurchase(shoppingPurchase);
    }

    /**
     * 批量删除购买详情
     * 
     * @param merchantOrderNumbers 需要删除的购买详情主键
     * @return 结果
     */
    @Override
    public int deleteShoppingPurchaseByMerchantOrderNumbers(String[] merchantOrderNumbers)
    {
        return shoppingPurchaseMapper.deleteShoppingPurchaseByMerchantOrderNumbers(merchantOrderNumbers);
    }

    /**
     * 删除购买详情信息
     * 
     * @param merchantOrderNumber 购买详情主键
     * @return 结果
     */
    @Override
    public int deleteShoppingPurchaseByMerchantOrderNumber(String merchantOrderNumber)
    {
        return shoppingPurchaseMapper.deleteShoppingPurchaseByMerchantOrderNumber(merchantOrderNumber);
    }
}
